CREATE TABLE `SRSpread`.`MsgSpreadBookQuote` (
`skey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'SR Spread Key (should have corresponding ProductDefinition record)',
`skey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'SR Spread Key (should have corresponding ProductDefinition record)',
`skey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'SR Spread Key (should have corresponding ProductDefinition record)',
`isTest` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'Yes indicates that response is made of entirely of isTest=Yes SpreadExchOrders',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'common spread underlier',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'common spread underlier',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'common spread underlier',
`SRspreadID` BIGINT NOT NULL DEFAULT 0,
`bidPrice1` DOUBLE NOT NULL DEFAULT 0 COMMENT 'bid price',
`isBidPrice1Valid` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`askPrice1` DOUBLE NOT NULL DEFAULT 0 COMMENT 'ask price',
`isAskPrice1Valid` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`bidSize1` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at bidPrice',
`askSize1` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at askPrice',
`bidPrice2` DOUBLE NOT NULL DEFAULT 0 COMMENT '2nd best bid price',
`isBidPrice2Valid` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`askPrice2` DOUBLE NOT NULL DEFAULT 0 COMMENT '2nd best ask price',
`isAskPrice2Valid` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`bidSize2` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at 2nd price',
`askSize2` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at 2nd price',
`bidExch1` ENUM('None','AMEX','BOX','CBOE','ISE','NYSE','PHLX','NSDQ','BATS','C2','NQBX','MIAX','GMNI','CME','CBOT','NYMEX','COMEX','ICE','EDGO','MCRY','MPRL','SDRK','DQTE','EMLD','CFE','MEMX','SPHR','EUREX','CEDX','NXAM','NXBR','NXLS','NXML','NXOS','NXP','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'exchange at bid price with the largest size (if any)',
`askExch1` ENUM('None','AMEX','BOX','CBOE','ISE','NYSE','PHLX','NSDQ','BATS','C2','NQBX','MIAX','GMNI','CME','CBOT','NYMEX','COMEX','ICE','EDGO','MCRY','MPRL','SDRK','DQTE','EMLD','CFE','MEMX','SPHR','EUREX','CEDX','NXAM','NXBR','NXLS','NXML','NXOS','NXP','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'exchange at ask price with the largest size (if any)',
`bidMask1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'exchange bid bit mask (OptExch mask for NMS spreads; zero for single exchange spreads)',
`askMask1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'exchange ask bit mask (OptExch mask for NMS spreads; zero for single exchange spreads)',
`bidTime` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'last bid price or size change',
`askTime` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'last ask price or size change',
`printVolume` INT NOT NULL DEFAULT 0,
`updateType` ENUM('None','PrcChange','SizeOnly','PrevPeriod') NOT NULL DEFAULT 'None',
`srcTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'source high precision timestamp (if available)',
`netTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'inbound packet PTP timestamp from SR gateway switch;usually syncronized with facility grandfather clock',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`skey_tk`,`skey_at`,`skey_ts`,`isTest`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains live spread quote records from the individual equity option exchanges. Each record contains up to two price levels and represents a live snapshot of the book for a specific spread.';